From: Eli Zaretskii Date: Tue, 8 May 2001 16:24:07 +0000 (+0000) Subject: (convert-standard-filename): Start replacing slashes X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1~1^2~40417 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=ce426aa11f4fd363156c210b3dadedf4c92e9293;p=emacs.git (convert-standard-filename): Start replacing slashes from the beginning of the file name, not from where the last invalid character was. From "Andrew Maguire (SWW)" --- diff --git a/lisp/w32-fns.el b/lisp/w32-fns.el index 8e0e85dc5f1..018390d4b4a 100644 --- a/lisp/w32-fns.el +++ b/lisp/w32-fns.el @@ -266,11 +266,12 @@ with a definition that really does change some file names." (setq start (match-end 0))) ;; convert directory separators to Windows format ;; (but only if the shell in use requires it) - (if (w32-shell-dos-semantics) - (while (string-match "/" name start) - (aset name (match-beginning 0) ?\\) - (setq start (match-end 0)))) - name)) + (when (w32-shell-dos-semantics) + (setq start 0) + (while (string-match "/" name start) + (aset name (match-beginning 0) ?\\) + (setq start (match-end 0)))) + name)) ;;; Fix interface to (X-specific) mouse.el (defun x-set-selection (type data)